#pragma once

#include "cocos2d.h"

using namespace cocos2d;

typedef enum {
	kUp = 1,
	kLeft = 2,
	kRight = 3,
	kDown = 4,
	kFire = 5,
	kStay = 6,
} HeroAct;

typedef enum {
	ku = 1,
	kl = 2,
	kr = 3,
	kd = 4,
} ToOrg;

class GameHero
{
public: 
//private:
	CCSprite *heroSprite;
	float speed;
	HeroAct kact;
	ToOrg org;
	CCArray *tileArray;
	CCPoint touchPos;
	CCTimer *timer;

public:
	bool initAtPoint(CCPoint point, CCLayer *layer);
	void changeWithSpriteFile(const char* fileName);
	void moveLeft();
	void moveRight();
	void moveUp();
	void moveDown();
	void onFire(CCSprite *bomb);
	void onStay();
};
